package cn.boundtw2.Stream02;


import java.io.FileInputStream;
import java.io.IOException;

public class Demo01IntputStream {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("IOliu\\a.txt");
      /*  int len = fis.read();
        System.out.println(len);//97
        len = fis.read();
        System.out.println(len);//98
        len = fis.read();
        System.out.println(len);//99
        len = fis.read();
        System.out.println(len);//-1
        */
        int len = 0;
        while ((len = fis.read())!=-1){
            System.out.println((char)len);//abc
        }//用循环优化
        fis.close();
    }
}
